const cache = {};

function importAll (r) {
  r.keys().forEach((key) => (cache[key] = r(key)));
}

// export function importAllComponents () {
//   importAll(require.context('../componentscom/', true, /\.vue$/));
// }
const context = require.context('../componentscom/', true, /\.vue$/);
export const install = (Vue) => {
  context.keys().forEach((key) => {
    const component = context(key).default;
    Vue.component(component.name, component);
  });
};
